import Vue from 'vue'
import VueRouter from 'vue-router'
import Details from '../views/Details.vue'
import Empty from '../views/Login.vue'
import Home from '../views/Home'
import Goodslist from '../components/Goodslist'
import People from '../components/People'
import Address from '../components/Address'
import Cartlist from '../components/Cartlist'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Details',
    component: Details
  },
  {
    path:'/cart',
    name:'cart',
    component:Empty
  },
  {
    path: '/goodslist',
    component: Goodslist
  },
  {
    path: '/people',
    component: People
  },
  {
    path: '/address',
    component: Address
  },
  {
    path: '/cartlist',
    component: Cartlist
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes,
})

// router.beforeEach((to,from)=>{
//   console.log(to,from)
// })

export default router
